#!/usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'

from ._datatodisk import DataToDisk
import yaml

class YamlDataToDisk(DataToDisk):
    def __init__(self, filePath):
        self._filePath = filePath

    def write(self):
        data = self.scanScene()
        if not data:
            raise ValueError, "data is none"
        with open(self._filePath, 'w') as f:
            yaml.safe_dump(data, f, default_flow_style=False)


